﻿@using Freesql.Tool.Helpers;
@using Freesql.Tool.Models;
@using System.Collections.Generic;
@{
    var gen = Model as Freesql.Tool.Models.RazorAllTemplateModel;
    var name = gen.Type.Name;
    var list = ReflectionHelper.GetDto(gen.Type);
    var enums = list.Where(p => p.IsEmun).Select(p => p.Type).ToArray();
    var inEnum = enums.Length > 0;
    var enumStr = string.Join(",", enums);

}
@if (inEnum)
{
@:import { @enumStr } from '@@/enums'
}
declare global{
    type @name = {
@foreach (var item in list)
{
        @:@item.Name: @item.Type;
}
    }
}

export { };